package com.kim.net;

import java.io.IOException;

public abstract class NetGet implements NetBase {

	protected String url;
	protected NetCallback netCallback;

	public NetGet(String url, NetCallback netCallback) {
		this.url = url;
		this.netCallback = netCallback;
	}

	public final void sendEntity() {
		getNetInputStream();
	}

	/**
	 * 获取网络输入流
	 * 
	 * @return
	 * 
	 */
	protected abstract void getNetInputStream();

	/**
	 * 捕获异常
	 * 
	 * @param ex
	 * @return
	 * 
	 */
	protected abstract void catchException(IOException ex);
}
